package com.valuegroup.smarttodo.data.vo;

import com.valuegroup.smarttodo.data.model.Event;
import com.valuegroup.smarttodo.plugins.pickdialog.DateUtils;

import java.io.Serializable;

public class CurriculumEventVo implements Serializable {
    private Long id;
    private Long pid;
    private String title;
    private String scheduDt;
    private int minute = 0;
    private int sort = 0;
    private Boolean finish = false;

    public static CurriculumEventVo convertEvent(Event t) {
        CurriculumEventVo v = new CurriculumEventVo();
        v.setId(t.getId());
        v.setPid(t.getSourceId());
        v.setTitle(t.getTitle());
        v.setFinish(t.getFinish());
        v.setMinute(t.getPreMinute());
        if (t.getJoinSchedule() && t.getScheduleDt() != null) {
            v.setScheduDt(DateUtils.date2str(t.getScheduleDt(), DateUtils.F31));
        }
        return v;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getScheduDt() {
        return scheduDt;
    }

    public void setScheduDt(String scheduDt) {
        this.scheduDt = scheduDt;
    }

    public int getMinute() {
        return minute;
    }

    public void setMinute(int minute) {
        this.minute = minute;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public Boolean getFinish() {
        return finish;
    }

    public void setFinish(Boolean finish) {
        this.finish = finish;
    }
}
